The Ottoman empire attained its largest dimensions in Europe with the conquest in 1672 of the fortress of Kamenets in Podolia (Kamieniec Podolski), which extended the Domain of Islam as far as the middle course of the Dniester. To the south-west, between this river and the Danube, lay the two tributary principalities of Moldavia and Wallachia, rich lowlands under palatine rulers chosen by the sultan. Divided from these by the Carpathian mountains, the prince of Transylvania stood in a similar relation to the Porte. The greater part of Hungary, only about a fifth of which lay under Habsburg rule, was divided into directly governed vilayets: Temesvár in the east; Nové Zamky (Neuhäusel), Kaniza, and Varasdin in the far west; Eger (Erlau) and above all Buda in the north. In the empire as a whole there were nearly forty vilayets, subdivided into departments (sanjaks), more or less on a uniform administrative plan but very variable in size, in which the sultan was normally represented by a resident pasha, the vali and sanjak-bey respectively. South of the Danube and the Drava, the grand vilayet (beyler-beylik) of Rumelia included all of what is now European Turkey, Bulgaria, Thessaly, most of Yugoslavia, and Albania; but Bosnia and the Morea had been formed into separate governments, while most of Croatia was ruled by Vienna and portions of the Dalmatian coast by Venice; the republic of Ragusa (Dubrovnik), like Salonica an important gateway to Balkan trade, merely paid tribute to the sultan. The Greek Archipelago, together with certain coastal districts of the Aegean (such as Gallipoli) and the sanjak of the Morea and Lepanto, was directly administered by the Kaptan Pasha of the imperial navy; Crete had been annexed to this vilayet, from Venice, as recently as 1670.